<template>
	<view class="detailsPage searchResults details customTitleBar" :style="{borderTopWidth:statusBarHeight}">
		<view class="custom-status-bar" :style="{backgroundColor: customTitleBarBg,height:statusBarHeight}"></view>
		<view class="custom-nav-bar" :style="{top:statusBarHeight,backgroundColor: customTitleBarBg,}">
			<view class="btn-icon-back"  @click="goback">返回</view>
			<text class="title-black">论文</text>
		</view>
		<view class="gap"></view>
		<view class="container-wrap">
			<view class="container">
				<view class="news-list">
					<view class="news-item">
						<view class="content">
							<view class="title"><text>{{articleinfo.articleTitle}}</text></view>
							<view class="column"><text>{{articleinfo.articleTrunfrom}}</text><text class="read-num">{{articleinfo.articleBrowse+1}} 阅读</text></view>
						</view>
						<!-- <view class="pic" ><image :src="baseUrl+articleinfo.attachmentUrl"></image></view> -->
					</view>
					<!-- 案例详情s -->
				<!-- 	<view class="news-item" style="display: none;">
						<view class="content">
							<view class="title"><text>肿瘤是一类严重威胁人民健康和生肿瘤是一类严重威胁人民健康和生肿瘤是一类严重威胁人民健康和生</text></view>
							<view class="column"><text>新华网</text><text class="read-num">4132 阅读</text></view>
						</view>
					</view> -->
					<!-- 案例详情e -->
				</view>
				<view class="body">
					<u-parse :content="articleinfo.articleContent"></u-parse>
				<!-- 	<view style="text-indent: 2em;">{{articleinfo.articleTrunfrom}}</view>
					<image src="/static/img/temp/temp_04.jpg" mode="widthFix" style="margin-top: 28rpx;"></image>
					<view style="text-indent: 2em;margin-top: 28rpx;">近年来抗肿瘤药物的研究取得了飞速的发展，出现了一些新型的抗肿瘤药物，作用于肿瘤发生和转移的不同环节和新靶点。按照抗肿瘤的传统分类和研究进展，将抗肿瘤药物分为细胞毒药物；影响激素平衡的药物；其他抗肿瘤药物，包括生物反应调节和新型分子靶向药物等。</view> -->
				</view>
			</view>
		</view>
		<!-- 底部导航s -->
		<view class="menu-bar">
			<view class="menu-bar-item" @click="toHome"><view class="icon icon-home"></view><text>首页</text></view>
			<view class="menu-bar-item" @click="toPersonalCenter"><view class="icon icon-me"></view><text>我的</text></view>
		</view>
		<!-- 底部导航s -->
	</view>
</template>

<script>
	import { getArticleById} from '@/common/api.js';
	// 引入配置
	import config from '@/common/config'
	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'
	export default {
		data() {
			return {
				customTitleBarBg: 'rgba(250,250,250,1)',
				statusBarHeight: statusBarHeight,
				articleId:null,
				articleinfo:null,
				baseUrl:null,
			}
		},
		onLoad(options) {
			this.baseUrl=config.baseUrl;
			this.articleId = options.articleId;
			
		},onShow() {
			this.getArticleById();
		},
		methods: {
			goback(){
				uni.navigateBack({
					
				})
			},
			getArticleById(){
				// get请求 1论文 2案例
				getArticleById({params:{ 'articleId':this.articleId}}).then(data => {
					console.log(data)
					this.articleinfo=data;
				
				}).catch(() =>{
					
				})
			},
			toHome() {
				uni.redirectTo({
					url: '../index/index',
				});
			},
			toPersonalCenter() {
				uni.redirectTo({
					url: '../personalCenter/personalCenter',
				});
			},
			
		}
	}
</script>

<style>
	page{background-color: #fff;}
</style>